<template>
  <div class="tabcontent">
    <div v-for="(item, index) in list" :key="index">
      <van-card
        :num="item.goodsList[0].number"
        :price="item.goodsList[0].price"
        :desc="item.goodsList[0].specifications[0]"
        :title="item.goodsList[0].goodsName"
        :thumb="item.goodsList[0].picUrl"
      >
        <template #footer>
          <van-button size="mini">{{ item.orderStatusText | str }}</van-button>
          <van-button size="mini" v-show="active == 1 ? true : false"
            >立即支付</van-button
          >
        </template>
      </van-card>
    </div>
  </div>
</template>

<script>
import { Card, Button } from "vant";
export default {
  name: "TabContent",
  props: ["list", "str",],
  data() {
    return {};
  },
  filters: {
    str: (value) => {
      return value.slice(0, 3);
    },
  },
 watch:{
  change(val){
      this.list =val
  }
 },
  components: {
    [Card.name]: Card,
    [Button.name]: Button,
  },
};
</script>

<style lang="less" scoped>
</style>